//禁止插入，会导致已使用的组件混乱
export enum KeyActionType {
    none,
    move,//移动
    select,//选择 
    return,//返回 
    switch,//切换
    sort,//排序
    change,//更换 装备等
    takeoff,//卸下 装备等。
    warehouse,//进入仓库
    role,//进入养成
    explore,//进入探索
    train,//进入训练
    menu,//菜单
    buy,     //购买
    upgrade, //强化
    build,//建造
    switchWorld,//切换表里世界
    teamManagement,//队伍管理
    adjustFormation,//调整阵型
    skipRound,//跳过回合
    showDetails,//显示详情
    policyCard,//策略卡
    bossConfront,//Boss迎战
    goalCompleted,//目标已完成
    miniMap,//小地图
    forwardMovement,//正向移动
    roleDetails,//详情
    switchCardGroup,//在备战中切换策略卡组
    openStoreInPreparing,//在备战中打开仓库
    addItemToBag,//在备战中添加道具到背包
    moveItemToStore,//在备战中将道具放回仓库
    changeRolePosition,//在备战中改变角色位置
    removeRole,//在备战中移除角色
    showRoleList,//在备战中打开角色列表
    addRoleToTeam,//在备战中将角色加入队伍
    startExplore,//在备战中开始探索
    use,//使用
    lookCardGroup,//查看卡组
    battleSkillConfirm,//技能确认
    battleSkillCancel,//技能取消
    battleCheck,//查看单位
    battleCheckBack,//查看单位返回
    battleSpeed,//战斗动画加速
    battleMenu,//战斗菜单
    close,//关闭
    prePage,//上一页
    nextPage,//下一页
    checkOutNextStep,//结算下一页
    checkOutOver,//结算返回
    lookClue,//查看情报
    equip, //装备
    moveH,//水平移动切换
    moveV,//垂直移动切换
    reset,//还原
    resetname,//重命名
    finishFormation,//完成调整
    battleActionPass,//战斗跳过回合
    DeleteSave,//删除存档,
    LookEquipInfo,//查看饰品详情。
    skipStory,//跳过剧情
    nextDialog,//继续
    startAction,//开始行动
    putInBag,//放入背包
    checkBag,//查看背包
    discard,//放弃
    checkMindLevel,//查看局内养成意志点数
    deblocking,//解锁
    alertConfirm,//确认
    alertCancel,//取消
    alertRetry,//重试
    volitionLevel,//意志等级
    discardEquipment,//装备丢弃
    rest,//礼物卡，休息
}

export type KeyAction = { keyCodes: string[], name?: string, cc_key?: string, steam_key?: string, soundEventId?: number }

export let KeyActionInfo: { [key: string]: KeyAction } = {
    move: { keyCodes: ['Up', 'Left', 'Down', 'Right'] },
    switch: { keyCodes: ['LB', 'RB'] },
    menu: { keyCodes: ['Menu'] },
    select: { keyCodes: ['A'] },
    change: { keyCodes: ['A'] },
    buy: { keyCodes: ['A'] },
    upgrade: { keyCodes: ['A'] },
    build: { keyCodes: ['A'] },
    use: { keyCodes: ['A'] },
    return: { keyCodes: ['B'], name: "返回" },
    close: { keyCodes: ['B'] },
    roleDetails: { keyCodes: ['X'] },
    sort: { keyCodes: ['Y'] },
    prePage: { keyCodes: ['LB'] },
    nextPage: { keyCodes: ['RB'] },
    lookCardGroup: { keyCodes: ['Y'] },
    resetname: { keyCodes: ['Y'] },
    equip: { keyCodes: ['A'] },
    takeoff: { keyCodes: ['X'] },
    warehouse: { keyCodes: ['X'] },
    role: { keyCodes: ['Y'] },
    train: { keyCodes: ['B'] },
    explore: { keyCodes: ['View'] },
    teamManagement: { keyCodes: ['X'] },
    skipRound: { keyCodes: ['B'] },
    miniMap: { keyCodes: ['View'] },
    showDetails: { keyCodes: ['LT'] },
    forwardMovement: { keyCodes: ['RT'] },
    policyCard: { keyCodes: ['LB'] },
    switchWorld: { keyCodes: ['RB'] },
    bossConfront: { keyCodes: ['A'] },
    goalCompleted: { keyCodes: ['A'] },
    adjustFormation: { keyCodes: ['Y'] },
    finishFormation: { keyCodes: ['Y'] },
    switchCardGroup: { keyCodes: ['X'] },
    openStoreInPreparing: { keyCodes: ['A'] },
    addItemToBag: { keyCodes: ['A'] },
    moveItemToStore: { keyCodes: ['A'] },
    changeRolePosition: { keyCodes: ['A'] },
    removeRole: { keyCodes: ['X'] },
    showRoleList: { keyCodes: ['A'] },
    addRoleToTeam: { keyCodes: ['A'] },
    startExplore: { keyCodes: ['View'] },
    battleSkillConfirm: { keyCodes: ['A'] },
    battleSkillCancel: { keyCodes: ['B'] },
    battleActionPass: { keyCodes: ['View'] },
    battleCheck: { keyCodes: ['RT'] },
    battleCheckBack: { keyCodes: ['B'] },
    battleSpeed: { keyCodes: ['Y'] },
    battleMenu: { keyCodes: ['Menu'] },
    checkOutNextStep: { keyCodes: ['A'] },
    checkOutOver: { keyCodes: ['A'] },
    lookClue: { keyCodes: ['Y'] },
    moveH: { keyCodes: ['Left', 'Right'] },
    moveV: { keyCodes: ['Up', 'Down'] },
    reset: { keyCodes: ['X'] },
    DeleteSave: { keyCodes: ['X'] },
    LookEquipInfo: { keyCodes: ['LT'] },
    skipStory: { keyCodes: ['View'] },
    nextDialog: { keyCodes: ['A'] },
    startAction: { keyCodes: ['A'] },
    putInBag: { keyCodes: ['A'] },
    checkBag: { keyCodes: ['X'] },
    discard: { keyCodes: ['B'] },
    checkMindLevel: { keyCodes: ['View'] },
    deblocking: { keyCodes: ['A'] },
    alertConfirm: { keyCodes: ['A'] },
    alertCancel: { keyCodes: ['B'] },
    alertRetry: { keyCodes: ['A'] },
    volitionLevel: { keyCodes: ['A'] },
    discardEquipment: { keyCodes: ['X'] },
    rest: { keyCodes: ['View'] },
}